package com.server.pinggu.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.StringUtils;
import com.server.pinggu.mapper.SenUnfocuslogMapper;
import com.server.pinggu.domain.SenUnfocuslog;
import com.server.pinggu.service.ISenUnfocuslogService;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ltao
 * @date 2022-10-23
 */
@Service
public class SenUnfocuslogServiceImpl extends ServiceImpl<SenUnfocuslogMapper, SenUnfocuslog> implements ISenUnfocuslogService {

    @Override
    public List<SenUnfocuslog> queryList(SenUnfocuslog senUnfocuslog) {
        LambdaQueryWrapper<SenUnfocuslog> lqw = Wrappers.lambdaQuery();
        if (senUnfocuslog.getUid() != null){
            lqw.eq(SenUnfocuslog::getUid ,senUnfocuslog.getUid());
        }
        if (senUnfocuslog.getYid() != null){
            lqw.eq(SenUnfocuslog::getYid ,senUnfocuslog.getYid());
        }
        if (StringUtils.isNotBlank(senUnfocuslog.getUopenid())){
            lqw.eq(SenUnfocuslog::getUopenid ,senUnfocuslog.getUopenid());
        }
        if (senUnfocuslog.getDtime() != null){
            lqw.eq(SenUnfocuslog::getDtime ,senUnfocuslog.getDtime());
        }
        return this.list(lqw);
    }
}